package web

import (
	"github.com/kataras/iris/v12"
	"iris_blog/utils"
)

type Focus struct {
}

// 首页的分页列表
func (a Focus) GetAll(i iris.Context) {

	results := []map[string]interface{}{}
	utils.DB.Raw("SELECT * FROM focus WHERE id IN ?", []int{1, 2, 3}).Find(&results)

	i.JSON(map[string]interface{}{
		"code": 20000,
		"data": results,
	})
}
